<template>
  <div>
    <table class="user-table">
      <thead>
      <tr>
        <th>学号</th>
        <th>姓名</th>
        <th>成绩</th>
      </tr>
      </thead>
      <tbody v-for="s in students" :key="s.stuId">
      <tr>
        <td v-text="s.stuNumber">1</td>
        <td v-text="s.stuName">小明</td>
        <td v-text="s.score">123456</td>
      </tr>

      </tbody>
    </table>


  </div>
</template>

<script>
export default {
  name: "ClassDetail",
  data() {
    return {
      students: null
    }

  },
  created() {
    this.initClass(this.$route.params.id);
  },
  methods: {
    initClass(id) {
      const that = this;
      that.axios.get("/api/class_detail_jump/"+id).then(({data}) => {
        this.students = data.data;
      });
    },
  }
}
</script>

<style scoped>

</style>
